// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 变更类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022-12-15
 */
public enum MessagePushBusinessEnum {
    CHIMI(1, "CHIMI模块", "/chimi","【RDKS提醒】"),
    STANDARD(2, "标准模块", "/dashboard","【RDKS提醒】"),
    BUTLER_FAQ(3, "知识充电站--FAQ", "/exhibition","【RDKS提醒】"),
    BUTLER_PROCESS(4, "知识充电站--流程与系统", "/exhibition","【RDKS提醒】"),
    BUTLER_PRODUCT(5, "知识充电站--产品知识", "/exhibition","【RDKS提醒】"),
    BUTLER_SMART(6, "知识充电站--智慧集成专栏", "/exhibition","【RDKS提醒】"),
    BUTLER_OUT(7, "知识充电站--外部资讯", "/exhibition","【RDKS提醒】"),
    BUTLER_EXPRESS(8, "知识充电站--专家课堂", "/exhibition","【RDKS提醒】"),
    BUTLER_PATENT(9, "知识充电站--专利精选", "/exhibition","【RDKS提醒】"),
    BUTLER_GPS(10, "知识充电站--GPS", "/exhibition","【RDKS提醒】"),
    BUTLER_HOTSPOT(11, "知识充电站--热点栏目", "/exhibition","【RDKS提醒】"),
    EXPERT_MODULE(21, "专家模块", "/specialist/project","【RDKS提醒】"),
    PATENT_MODULE(31, "专利模块", "/patent/spread","【RDKS提醒】"),
    PATENT_TRENDS(32, "专利动态", "/patent/trends","【RDKS提醒】"),
    PATENT_RISK(33, "风险管控", "/patent/work","【RDKS提醒】"),
    PATENT_RISK_PROCESS(34, "风险管控--审批流程", "/patent/work","【审批流程提醒】"),
    PATENT_RISK_PENDING(35, "风险管控--风险专利监控", "/patent/work","【风险专利监控提醒】"),
    PATENT_RISK_URGING(36, "风险管控--流程催办", "/patent/work","【流程催办提醒】"),
    PATENT_RISK_PROJECT(37, "风险管控--项目风险监控", "/patent/work","【项目风险监控提醒】"),

    OTHER(99, "系统通知", "","【RDKS提醒】"),
    AUDIT(100, "审核通知", "","【RDKS提醒】"),
    INTERACTIVE(101, "互动通知", "","【RDKS提醒】"),
    CONVOLUTION(102, "卷积通知", "","【RDKS提醒】");

    private int value;

    private String name;

    private String menuUrl;

    private String msgTitle;

    MessagePushBusinessEnum(int value, String name, String menuUrl,String msgTitle) {
        this.value = value;
        this.name = name;
        this.menuUrl = menuUrl;
        this.msgTitle = msgTitle;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public String getMenuUrl() {
        return menuUrl;
    }
    public String getMsgTile() {
        return msgTitle;
    }

    public static String getNameByValue(int value) {
        MessagePushBusinessEnum arrObj[] = MessagePushBusinessEnum.values();
        for (MessagePushBusinessEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return "其他";
    }

    public static String getWechatNameByValue(int value) {
        MessagePushBusinessEnum arrObj[] = MessagePushBusinessEnum.values();
        for (MessagePushBusinessEnum obj : arrObj) {
            if (value < 3 || value > 20) {
                if (value == obj.getValue()) {
                    return obj.getName();
                }
            } else if (value > 2 && value < 20) {
                return "知识充电站";
            }
        }
        return "其他";
    }

    public static String getMenuUrlByValue(int value) {
        MessagePushBusinessEnum arrObj[] = MessagePushBusinessEnum.values();
        for (MessagePushBusinessEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getMenuUrl();
            }
        }
        return "";
    }

    public static String getMsgTitleByValue(int value) {
        MessagePushBusinessEnum arrObj[] = MessagePushBusinessEnum.values();
        for (MessagePushBusinessEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getMsgTile();
            }
        }
        return "";
    }
}
